<?php
/**
 * Created by JetBrains PhpStorm.
 * User: shaoshuai
 * Date: 12-7-15
 * Time: 上午12:59
 * To change this template use File | Settings | File Templates.
 */

include 'boot.php';
session_start();
$myName = $_GET['username'];

$onlineList = OnlineList::getInstance();
$myself = new User(array('name' => $myName));
$onlineList->removeUser($myself);

unset($_SESSION['username']);

$output = array(
    'success' => true,
);
echo json_encode($output);
